package com.dms.modules.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel(value = "ProductCommentDTO", description = "商品评论DTO")
public class ProductCommentDTO {
    
    @ApiModelProperty("评论ID")
    private Long id;
    
    @NotNull(message = "商品ID不能为空")
    @ApiModelProperty("商品ID")
    private Long productId;
    
    @ApiModelProperty("订单ID")
    private Long orderId;
    
    @NotNull(message = "评分不能为空")
    @Min(value = 1, message = "评分最小为1")
    @Max(value = 5, message = "评分最大为5")
    @ApiModelProperty("评分：1-5")
    private Integer rating;
    
    @NotBlank(message = "评论内容不能为空")
    @ApiModelProperty("评论内容")
    private String content;
    
    @ApiModelProperty("评论图片列表")
    private List<String> images;
    
    @ApiModelProperty("是否匿名：0-否 1-是")
    private Integer anonymous;
    
    @ApiModelProperty("商家回复")
    private String reply;
} 